/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Calculos;

public class Dato {

    private float lo, deltaL, celda, diametro, esfuerzo, deformacion;

    public Dato() {
        this.lo = 0;
        this.deltaL = 0;
        this.celda = 0;
        this.diametro = 0;
    }
    
    public Dato(float lo, float diametro, float deltaL, float celda) {
        this.lo = lo;
        this.deltaL = deltaL;
        this.celda = celda;
        this.diametro = diametro;
    }

    public float getLo() {
        return lo;
    }

    public void setLo(float lo) {
        this.lo = lo;
    }

    public float getDeltaL() {
        return deltaL;
    }

    public void setDeltaL(float deltaL) {
        this.deltaL = deltaL;
    }

    public float getCelda() {
        return celda;
    }

    public void setCelda(float celda) {
        this.celda = celda;
    }

    public float getEsfuerzo() {
        esfuerzo = (float) (celda / (Math.PI * Math.pow((diametro / 2), 2)));
        return esfuerzo;
    }

    public void setEsfuerzo(float esfuerzo) {
        this.esfuerzo = esfuerzo;
    }

    public float getDeformacion() {
        deformacion = (deltaL / lo) * 100;
        return deformacion;
    }
    
    public float getElongacion() {
        return (deltaL / 175) * 100;
    }

    public void setDeformacion(float deformacion) {
        this.deformacion = deformacion;
    }

    public float getDiametro() {
        return diametro;
    }
}
